<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <canvas id='am' width="400" height="400"></canvas>
    <script src="./js/fabric.js">
    </script>
    <script>
    var can = new fabric.Fabric('am');
    var rect = new fabric.Rect({
        left:100,
        width:100,
        fill:'red',
        width:30,
        height:30
    })
    can.add(rect)
    </script>
</body>
</html>